import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<PCB> processes = new ArrayList<>();
        processes.add(new PCB(1, 3, 10));
        processes.add(new PCB(2, 1, 6));
        processes.add(new PCB(3, 4, 2));
        processes.add(new PCB(4, 5, 4));
        processes.add(new PCB(5, 2, 8));

        // 优先级调度测试
        System.out.println("优先级权调度:");
        PriorityScheduler.prioritySchedule(processes);

        // 重新初始化进程列表用于时间片轮转测试
        processes = new ArrayList<>();
        processes.add(new PCB(1, 3, 10));
        processes.add(new PCB(2, 1, 6));
        processes.add(new PCB(3, 4, 2));
        processes.add(new PCB(4, 5, 4));
        processes.add(new PCB(5, 2, 8));

        // 时间片轮转调度测试，设置时间片为2
        System.out.println("\n时间片轮转调度（时间片为3）:");
        RoundRobinScheduler.roundRobinSchedule(processes, 3);
    }
}
